#include <stdio.h>

int main(void)
{
	int num;
	int res = 0;

	scanf("%d", &num);

	do {
		res = res * 10 + num % 10;
		num /= 10;
	} while (num);

	printf("%d\n", res);

	return 0;
}
